<template>
  <div class="page">
    <div class="title">客户挑战通知</div>
    <div class="searchContent">
      <div class="inputContent">
        <ui-form class="query-form" :model="queryForm" label-width="140px">
          <ui-form-item label="开始时间">
            <ui-date-picker v-model="queryForm.beginTime" type="date" placeholder="选择开始时间" style="width: 300px"> </ui-date-picker>
          </ui-form-item>
          <ui-form-item label="结束时间">
            <ui-date-picker v-model="queryForm.engTime" type="date" placeholder="选择结束时间" style="width: 300px"> </ui-date-picker>
          </ui-form-item>
        </ui-form>
      </div>
      <div class="searchButton">
        <ui-button class="default-btn reset" @click="reset">重置</ui-button>
        <ui-button class="primary-btn" @click="search">查询</ui-button>
      </div>
    </div>
    <div class="tableContent">
      <div class="name">
        <span>挑战列表</span>
      </div>
      <vx-nodata :list="tableData" v-loading="isLoading" sub-title="暂无数据">
        <vx-table :tableData="tableData" :columns="columns"> </vx-table>
        <ui-pagination
          :total="total"
          :page-size="pageSize"
          :current-page="currentPage"
          :layout="layout"
          :page-sizes="pageSizeList"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          background
        >
        </ui-pagination>
      </vx-nodata>
    </div>
  </div>
</template>

<script>
import pagination from '@/common/mixin/pagination.js'; // 混入/分页
import vxTable from '@/components/vx-table';
export default {
  name: 'myCustom',
  mixins: [pagination],
  components: {
    vxTable,
  },
  data() {
    return {
      queryForm: {},
      tableData: [
        { customId: '1111111111', customName: 'AAAAAAAA', phone: 'qqqqqq' },
        { customId: '22222222222222', customName: 'BBBBBBB', phone: 'wwwww' },
        { customId: '333333', customName: 'CCCCCCCC', phone: 'eeeee' },
      ],
      columns: [
        {
          label: '客户号',
          prop: 'customId',
        },
        {
          label: '客户名称',
          prop: 'customName',
        },
        {
          label: '证件类型',
          prop: 'certifType',
        },
        {
          label: '证件号码',
          prop: 'certifNumber',
        },
        {
          label: '挑战机构',
          prop: 'challengeOriganization',
        },
        {
          label: '挑战客户经理',
          prop: 'challengeCurrentCustomManager',
        },
        {
          label: '挑战时间',
          prop: 'challengeTime',
        },
      ],
      customSelection: [],
      isLoading: false,
    };
  },
  mounted() {
    this.searchList();
  },
  methods: {
    searchList() {},
    getCustomLevel(e) {},
    search() {
      this.pageNum = 1;
      this.searchList();
    },
    reset() {
      this.queryForm.beginTime = undefined;
      this.queryForm.endTime = undefined;
      this.searchList();
    },
  },
};
</script>

<style lang="scss" scoped>
.page {
  .title {
    font-size: 18px;
    color: #000;
    font-weight: bold;
  }
  .searchContent {
    background: #fff;
    padding: 20px 20px 0 0;
    margin-top: 10px;
    .inputContent {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      padding: 10px;
      border-bottom: 1px solid #ccc;
      ::v-deep .ui-input {
        width: 190px !important;
      }
      ::v-deep .query-form .ui-form-item {
        width: 23% !important;
      }
    }
    .searchButton {
      padding: 10px 10px 10px 10px;
      display: flex;
      justify-content: right;
      align-items: center;
      .reset {
        border-color: #5085f9;
        color: #5085f9;
      }
    }
  }
  .tableContent {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    .name {
      span {
        font-size: 14px;
        color: #000;
        font-weight: bold;
      }

      margin-bottom: 20px;

      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .concern {
      background: #fff;
      border-color: orange;
      color: orange;
      font-size: 14px;
    }
    .alreayConcern {
      background: #fff;
      border-color: #ccc;
      font-size: 14px;
    }
    .footerButton {
      border-top: 1px solid #ccc;
      margin-top: 20px;
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}
.query-form {
  display: flex;
  flex-wrap: wrap;
}
.pointNum {
  color: #5085f9;
  cursor: pointer;
}

::v-deep .ui-date-editor--date .ui-input__prefix {
  left: 5px !important;
}
::v-deep .ui-date-editor--date .ui-input__inner {
  padding-left: 40px !important;
}
</style>
